package com.google.code.p.odbcconnectionchecker.db;

public class ConnectionStatus {
	
	private String connectionTimestamp; 
	private boolean connectionActive;
	private String errorMessage;
	
	/**
	 * Gets the time when the connection status was checked
	 * @return String containing a timestamp
	 */
	public String getConnectionTimestamp() {
		return connectionTimestamp;
	}
	
	/**
	 * Set the time when the connection was checked
	 * @param connectionTimestamp A String representing a timestamp
	 */
	public void setConnectionTimestamp(String connectionTimestamp) {
		this.connectionTimestamp = connectionTimestamp;
	}
	
	/**
	 * Gets the connection status. 
	 * @return true if the connection is ok, false else
	 */
	public boolean getConnectionActive() {
		return connectionActive;
	}
	
	/**
	 * Sets the connection status
	 * @param connectionStatus 
	 */
	public void setConnectionActive(boolean connectionActive) {
		this.connectionActive = connectionActive;
	}
	
	/**
	 * Gets the error message. Available only if the status of the connection is not active
	 * @return A String representing the error message
	 */
	public String getErrorMessage() {
		return errorMessage;
	}
	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}
	
}
